package com.omuao.common.exception;

/**
 * 锁
 *
 * @author yumi@omuao.com
 * @since 2019-10-17
 **/
public class LockException extends RuntimeException implements MessageCodeError {

    /**
     * 错误代码
     */
    private int code;

    /**
     * 消息
     */
    private String message;

    public LockException() {
    }

    public LockException(String message) {
        super(message);
        this.message = message;
    }

    public LockException(String message, Throwable cause) {
        super(message, cause);
        this.message = message;
    }

    public LockException(Throwable cause) {
        super(cause);
    }

    public LockException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.message = message;
    }

    public LockException(int code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
